<template>
    <div>
      <ul>
        <li v-for="item in list" :key="item.id">
          <router-link :to="`/home/message/${item.id}`">{{item.title}}</router-link>
        </li>
      </ul>
      <hr>
      <router-view></router-view>
    </div>
</template>

<script>
    var list = [
      {id:0,title:"message00"},
      {id:1,title:"message01"},
      {id:2,title:"message02"},
      {id:3,title:"message03"},
      {id:4,title:"message04"}
    ]

    export default {
        name: "Message",
        data(){
          return {
            list:[]
          }
        },
        mounted(){
           //模拟发请求
           setTimeout(()=>{
             this.list = list
           },1000)
        }
    }
</script>

<style scoped>

</style>
